<!DOCTYPE html>
<html lang="en"class="page-fill" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <title>用户中心</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="fly,layui,前端社区">
  <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
  <link rel="stylesheet" href="../../res/layui/css/layui.css">
  <link rel="stylesheet" href="../../res/css/global.css">
</head>
<body>

<div th:replace="pages/common/header :: head"></div>
<div class="layui-container fly-marginTop fly-user-main">
  <div th:replace="pages/common/user-nav :: user-nav"></div>

  <div class="fly-panel fly-panel-user" pad20>
    <!--
    <div class="fly-msg" style="margin-top: 15px;">
      您的邮箱尚未验证，这比较影响您的帐号安全，<a href="activate.html">立即去激活？</a>
    </div>
    -->

    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title" id="LAY_mine">
        <li data-type="mine-jie" lay-id="index" class="layui-this">我发的帖（<span>89</span>）</li>
        <li data-type="collection" data-url="/collection/find/" lay-id="collection">我收藏的帖（<span>16</span>）</li>
      </ul>
      <div class="layui-tab-content" style="padding: 20px 0;">
        <div class="home-main layui-row layui-col-space15">
          <div class="layui-col-md12">
            <div class="c-panel detail-box">
                <ul class="fly-list">
            <div th:if="${articles} ne null">
            <div th:each="article:${articles}">
                <li>
                    <a th:href="'/user/home/'+${article.artUserId}" class="fly-avatar">
                        <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" alt="贤心">
                    </a>
                    <h2>
                        <a class="layui-badge">分享</a>
                        <a th:href="'/article/detail/'+${article.articleId}" th:text="${article.title}"></a>
                    </h2>
                    <div class="fly-list-info">
                        <a th:href="'/user/home/'+${article.artUserId}" link>
                            <cite th:text="${article.artUserId}"></cite>
                            <!--
                            <i class="iconfont icon-renzheng" title="认证信息：XXX"></i>
                            <i class="layui-badge fly-badge-vip">VIP3</i>
                            -->
                        </a>
                        <span th:text="${#dates.format(article.createTime, 'yyyy-MM-dd HH:mm:ss')}"></span>

                        <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i> 60</span>
                        <span class="jieda-zan" type="zan"><i class="iconfont icon-zan"></i><em th:text="${article.likeNum}"></em></span>
                        <!--<span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>-->
                        <span class="fly-list-nums">
                <i class="iconfont icon-pinglun1" title="回答"></i> 66
              </span>
                    </div>
                    <div class="fly-list-badge">
                        <span class="layui-badge layui-bg-black">置顶</span>
                        <!--<span class="layui-badge layui-bg-red">精帖</span>-->
                    </div>
                </li>

<!--              <div class="layui-card" style="margin-bottom: 10px">-->
<!--                <div class="layui-card-header">-->
<!--                  <a th:href="'/article/'+${article.articleId}" th:text="${article.title}">-->
<!--                  </a>-->
<!--                </div>-->
<!--                <div class="layui-card-body">-->
<!--                  <span>-->
<!--                    <a class="fly-avatar" th:href="'/user/home/'+${article.artUserId}"> <img src=""></a>-->
<!--                  </span>-->
<!--                  <div class="user-info">-->
<!--                  <a class="c-fly-link" th:href="'/user/home/'+${article.artUserId}" th:text="${article.artUserId}"></a>-->
<!--                  <div th:text="${#dates.format(article.createTime, 'yyyy-MM-dd HH:mm:ss')}"></div>-->
<!--                  <a th:href="'/article/edit/'+${article.articleId}" class="layui-btn layui-btn-normal layui-btn-xs">编辑</a>-->
<!--                  <a class="layui-btn layui-btn-normal layui-btn-xs" th:href="'/article/'+${article.articleId}">查看原文</a>-->
<!--                    </div>-->
<!--                </div>-->

<!--              </div>-->
<!--              </div>-->
          </div>
        </div>
         </ul>
                <!-- 分页-->
              <div id="pagesplit"></div>
      </div>
      </div>
      </div>
    </div>
  </div>
</div>
</div>
<div th:replace="pages/common/footer :: footer"></div>
<script src="../../res/layui/layui.js"></script>
<script type="text/javascript" th:inline="javascript">
  layui.use(['layer', 'laypage'], function(){
    var layer = layui.layer
            ,laypage=layui.laypage
    laypage.render({
      elem: 'pagesplit'
      ,curr:[[${page}]]
      ,count:[[${count}]]
      ,limit:[[${limit}]]
      ,layout: ['count', 'prev', 'page', 'next', 'skip']
      ,jump: function(obj,first){
        console.log(obj);
        if(!first){
          location.href = "/user/index?page="+obj.curr+'&limit='+obj.limit
        }
      }
    });


  });
</script>

</body>
</html>